package visitor;

public class ComputerPartVisitor implements Visitor {

    @Override
    public void visit(Computer computer) {
        computer.display();
    }

    @Override
    public void visit(Keyboard keyboard) {
        keyboard.display();
    }

    @Override
    public void visit(Mouse mouse) {
        mouse.display();
    }

    @Override
    public void visit(Monitor monitor) {
        monitor.display();
    }
}
